// Copyright @ ChenChao

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "AbilitySystemInterface.h"

#include "WarriorBaseCharacter.generated.h"

class UWarriorAttributeSet;
class UWarriorAbilitySystemComponent;
class UDataAsset_StartUpDataBase;

UCLASS()
class WARRIOR_API AWarriorBaseCharacter : public ACharacter, public IAbilitySystemInterface
{
	GENERATED_BODY()

public:
	// 设置此角色属性的默认值
	AWarriorBaseCharacter();

	//~Begin IAbilitySystemInterface Interface.
	virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override;
	//~ End IAbilitySystemInterface Interface
	
protected:

	//~Begin Apawn Interface.
	virtual void PossessedBy(AController* NewController) override;	//当Controller（玩家或AI）获得该Pawn控制权时触发
	//~ End APawn Interface
	
#pragma region AbilitySystem
	//能力系统组件
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "AbilitySystem")
	UWarriorAbilitySystemComponent* WarriorAbilitySystemComponent;

	// 属性集
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "AbilitySystem")
	UWarriorAttributeSet* WarriorAttributeSet;
	
#pragma endregion

#pragma region CharacterData
	//角色启动资产
	UPROPERTY(EditDefaultsOnly,BlueprintReadonly,Category ="CharacterData|StartUp")
	TSoftObjectPtr<UDataAsset_StartUpDataBase> CharacterStartUpData;
#pragma endregion



	
public:
	
#pragma region getter
	FORCEINLINE UWarriorAbilitySystemComponent* GetWarriorAbilitySystemComponent() const { return WarriorAbilitySystemComponent; }

	FORCEINLINE UWarriorAttributeSet* GetWarriorAttribute() const { return WarriorAttributeSet; }

#pragma endregion

	
};
